<?php
	header("Content-Type:text/html;charset=utf-8");
	require "page.class.php";
	require '../../conn/mysql.php';
	$num=sql("frow", "list", "id", "where shangjiafan=0");
	$page=new Page($num,20);
	$res=sql("s", "list", "*", "where shangjiafan=0 {$page->limit}");
	echo '<table cellpadding="2" cellspacing="1" class="table">
		
		<tr>
                <td width="5%" class="list">ID</td>
				<td width="5%" class="list">奖励人</td>
                <td width="5%" class="list">推广人</td>
				<td width="20%" class="list">推广商品</td>
                <td width="55%"  class="list" >奖励人支付信息</td>
				<td width="5%"  class="list" >奖励金额</td>
	           <td width="5%"  class="list" >操作</td>
       </tr>';
	if($res){
		foreach ($res as $info){
		$res1=sql("s", "user", "*", "where user='".gv($info, "shangjia")."'");
		$info1=firstrow($res1);
			echo '<tr class="mouse click">
		<td class="list-text">'.gv($info, "id").'</td>
			<td class="list-text">'.gv($info, "shangjia").'</td>
			<td class="list-text">'.gv($info, "tjr").'</td>
		<td class="list-text">'.gv($info, "spm").'</td>
		<td class="list-text">姓名：'.gv($info1, "xingming")."，支付宝：".gv($info1, "zhifubao").'</td>
		<td class="list-text">'.gv($info, "fc")*0.05.'</td>
		<td class="list-text"><a href="../control.php?oper=jiangli&id='.gv($info, "id").'" >奖励</a></td>
			</tr>';
		}
	}
	
	echo '<tr><td  colspan="9">'.$page->fpage().'</td></tr>';
	echo '</table>';
